package pro.cherish.knowledgeumldesignpattern.designPattern.com.cherish.mediator;

import java.util.HashMap;
import java.util.List;

public class President implements Mediator {

    private HashMap<String,Department> map=new HashMap<String,Department>();

    @Override
    public void register(String dname, Department department) {
        this.map.put(dname,department);
    }

    @Override
    public void command(String dname) {
        map.get(dname).selfAction();
    }
}
